<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title th:text="${session.title}">123</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/ace-skins.min.css}"/>
</head>
<body class="navbar-fixed">
<div th:replace="common/top"></div>
<div class="container-fluid main_bg" id="main-container">
    <a id="menu-toggler" href="#"><span></span></a>
    <div th:replace="common/menu"></div>
    <div id="main-content" class="clearfix">
        <div id="page-content" class="clearfix">
            <div th:replace="common/title"></div>
            <h3 class="header smaller lighter blue"><em class="icon-eye-open"></em>查看战队</h3>
            <div th:if="${session.footUser.qx.text == '会员' || session.footUser.qx.text == 'VIP1' || session.footUser.qx.text == 'VIP2' || session.footUser.qx.text == 'VIP3'}">
                <div class="row-fluid">
                    <!--PAGE CONTENT BEGINS HERE-->
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'战队名称:' + ${footSociaty.name}">
                                123
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'战队总人数:' + ${footSociaty.totalNum}">
                                123
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'胜利次数:' + ${footSociaty.winTime}">
                                123
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'打平次数:' + ${footSociaty.sameTime}">
                                123
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'失败次数:' + ${footSociaty.loseTime}">
                                123
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'积分:' + ${footSociaty.jf}">
                                123
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'当前拥有会员数量:' + ${footSociaty.haveNum}">
                                123
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'状态:' + ${footSociaty.status.text}">
                                123
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'等级:' + ${footSociaty.level}">
                                123
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'活跃度:' + ${footSociaty.liveness}">
                                123
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <div class="controls" th:text="'段位:' + ${footSociaty.danGradingName}">
                                123
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <h3 class="header smaller lighter blue"><em class="icon-eye-open"></em>战队人员列表</h3>
                </div>
                <div class="row-fluid" th:each="t:${footSociatyInfoList}">
                    <div class="span3">
                        <div th:text="'玩家:' + ${t.userName}"></div>
                    </div>
                    <div class="span3">
                        <div th:text="'荣誉值:' + ${t.honor}"></div>
                    </div>
                    <div class="span3">
                        <div th:text="'职务:' + ${t.relation.text}"></div>
                    </div>
                    <div class="span3">是否通过:
                        <select id="agree" name="agree" class="input_fix3" title=""
                                th:onchange="'javascript:agree(' + ${t.id} + ', this.value)'">
                            <option value="false">请选择</option>
                            <option value="true">同意</option>
                            <option value="false">不同意</option>
                        </select>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="text-center span12">
                        <a class="btn" type="button" th:href="@{/hy/footSociaty/search}"><em
                                class="icon-arrow-left"></em>返回</a>
                    </div>
                </div>
            </div>
            <!--/#page-content-->
        </div>
        <div th:replace="common/skin :: skin"></div>
    </div>
    <!--/#main-content-->
</div>
<!--/.fluid-container#main-container-->
<div th:replace="common/js"></div>
<script type="text/javascript">
    function agree(id, value) {
        $.ajax({
            type: "POST",
            dataType: "json",
            url: "/hy/footSociatyInfo/agree",
            data: "id=" + id + "&agree=" + value,
            success: function (data) {
                if (data.msg === 'ok') {
                    window.location.reload();
                } else {
                    showTip('tip', '加入战队失败', 4000);
                }
            }
        });
    }
</script>
</body>
</html>